home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Bank smakow / BankSmakow.air / BankSmakow.swf / scripts / com / makingwaves / commands / SelectNewCommand.as < prev    next >
Text File  |  2009-12-16  |  891b  |  34 lines

  1. package com.makingwaves.commands
  2. {
  3.    import com.adobe.cairngorm.commands.Command;
  4.    import com.adobe.cairngorm.control.CairngormEvent;
  5.    import com.makingwaves.model.ModelLocator;
  6.    import com.makingwaves.vo.Recipe;
  7.    import mx.collections.ArrayCollection;
  8.    
  9.    public class SelectNewCommand implements Command
  10.    {
  11.        
  12.       
  13.       public function SelectNewCommand()
  14.       {
  15.          super();
  16.       }
  17.       
  18.       public function execute(param1:CairngormEvent) : void
  19.       {
  20.          var _loc4_:Recipe = null;
  21.          var _loc2_:ModelLocator = ModelLocator.getInstance();
  22.          var _loc3_:ArrayCollection = new ArrayCollection();
  23.          for each(_loc4_ in _loc2_.recipes)
  24.          {
  25.             if(_loc4_.isNew)
  26.             {
  27.                _loc3_.addItem(_loc4_);
  28.             }
  29.          }
  30.          _loc2_.recipes = _loc3_;
  31.       }
  32.    }
  33. }
  34.